Skip to content

Conversation

@sfc-gh-bnisco
Copy link

@sfc-gh-bnisco sfc-gh-bnisco commented Jul 2, 2025

This PR migrates streamlit-bokeh to utilize the new st.components.v2.component() API that was introduced in Streamlit 1.51.0

There are a number of technical changes in this PR:

  • Migrate from Webpack (via Create React App) to Vite
  • Migrate from Jest to Vitest
  • Migrate from setup.py to pyproject.toml

Besides the technical changes, the remaining changes in this PR are to support moving to the new API. The main difference is that v1.component runs in an iframe, where as v2.component does not.

Bokeh.js has a specific loading order that is required in order for the scripts to work. The main Bokeh script must exist before the plugins can be loaded. Bokeh is accessed from a variable on window. Due to these requirements, most of the actual changes in this PR is to support this loading order in a non-iframed environment.

Demo app here.

@sfc-gh-bnisco sfc-gh-bnisco changed the title [WIP] Utilize Custom Components v2 Framework [feat] Migrate to st.components.v2.component API Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants